package com.lu.wemedia.controller.v1;

import com.lu.model.common.controller.BaseController;
import com.lu.model.common.dtos.ResponseResult;
import com.lu.model.common.enums.AppHttpCodeEnum;
import com.lu.model.wemedia.dto.WmNewsDto;
import com.lu.model.wemedia.pojo.WmNewsMaterial;
import com.lu.wemedia.service.WmChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.security.PublicKey;

@RestController
@RequestMapping("/api/v1/channel")
public class WmChannelController extends BaseController {

    @Autowired
    private WmChannelService wmChannelService;

    /**
     * 查询所有频道
     * @return
     */
    @GetMapping("/channels")
    public ResponseResult channel() {
        return wmChannelService.listChannel();
    }


}
